//
//  CeoYouLBCell.m
//  JinChengYun
//
//  Created by 金橙云 on 2017/4/18.
//  Copyright © 2017年 金橙云. All rights reserved.
//

#import "CeoYouLBCell.h"

@implementation CeoYouLBCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        _dayLab = [[UILabel alloc] init];
        _dayLab.text = @"2017-09-18";
        _dayLab.textColor = [UIColor blackColor];
       // _dayLab.backgroundColor = [UIColor redColor];
        _dayLab.textAlignment = NSTextAlignmentCenter;
        _dayLab.font = [UIFont systemFontOfSize:12];
        [self addSubview:_dayLab];
        [_dayLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(80, 20));
            make.left.equalTo(self.mas_left).offset(15);
            make.top.equalTo(self.mas_top).offset(7);
        }];
        
        
        _shiLab =  [[UILabel alloc] init];
        _shiLab.text = @"3号楼/4号楼/5号楼/6号楼/商业/车位/储藏室";
        _shiLab.textColor = [UIColor blackColor];
        //_shiLab.backgroundColor = [UIColor redColor];
        _shiLab.numberOfLines = 0;
        _shiLab.textAlignment = NSTextAlignmentCenter;
        _shiLab.font = [UIFont systemFontOfSize:12];
        [self addSubview:_shiLab];
        [_shiLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(180, 20));
            //make.left.equalTo(_dayLab.mas_right).offset(15);
            make.centerX.equalTo(self.mas_centerX);
            make.top.equalTo(self.mas_top).offset(7);
        }];

        _piLab = [[UILabel alloc] init];
        _piLab.text = @"同意执行";
        _piLab.textColor = [UIColor colorWithHexString:@"#006400"];
        //_piLab.backgroundColor = [UIColor redColor];
        _piLab.textAlignment = NSTextAlignmentCenter;
        _piLab.font = [UIFont systemFontOfSize:12];
        [self addSubview:_piLab];
        [_piLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(80, 20));
            make.right.equalTo(self.mas_right).offset(-15);
            make.top.equalTo(self.mas_top).offset(7);
        }];
        

        
        
        
        
        
    }
    return self;
}



-(void)setCellYouHUilieBiaoWithDayLab:(NSString *)_day withShiLab:(NSString *)_shi withStatue:(NSString *)_statue withShenPi:(NSString *)_shen
{
    _dayLab.text = _day;
    _shiLab.text = _shi;
    if ([_statue isEqualToString:@"1"])
    {
        _piLab.text = _shen;
        _piLab.textColor = [UIColor blackColor];
    }
    else if ([_statue isEqualToString:@"2"])
    {
        _piLab.text = _shen;
        
        _piLab.textColor = [UIColor colorWithHexString:@"#006400"];
        
    }
    else
    {
        _piLab.text = _shen;
        _piLab.textColor = [UIColor redColor];
        
    }
    
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
